package cn.faster.sys.service.impl;

import cn.faster.sys.entity.SysUserRoleCenter;
import cn.faster.sys.mapper.SysUserRoleCenterMapper;
import cn.faster.sys.service.SysUserRoleCenterService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户角色中间表 服务实现类
 * </p>
 *
 * @author xiaoCoder
 * @since 2021-06-10
 */
@Slf4j
@Service
@AllArgsConstructor
public class SysUserRoleCenterServiceImpl extends ServiceImpl<SysUserRoleCenterMapper, SysUserRoleCenter> implements SysUserRoleCenterService {


    private final SysUserRoleCenterMapper sysUserRoleCenterMapper;

    /**
	* 根据id查询UserRoleCenter
	*/
    @Override
    public SysUserRoleCenter getUserRoleCenterById(Integer id) throws Exception {
        return sysUserRoleCenterMapper.getUserRoleCenterById(id);
    }

    /**
	* 查询UserRoleCenter列表
	*/
    @Override
    public List<SysUserRoleCenter> listUserRoleCenter(Map<String, Object> map) throws Exception {
        return sysUserRoleCenterMapper.listUserRoleCenter(map);
    }



    /**
	* 新增UserRoleCenter
	*/
    @Override
    @Transactional
    public Integer addUserRoleCenter(SysUserRoleCenter sysUserRoleCenter) throws Exception {
        return sysUserRoleCenterMapper.addUserRoleCenter(sysUserRoleCenter);
    }

    /**
	* 更新UserRoleCenter
	*/
    @Override
    @Transactional
    public Integer updateUserRoleCenter(SysUserRoleCenter sysUserRoleCenter) throws Exception {
        return sysUserRoleCenterMapper.updateUserRoleCenter(sysUserRoleCenter);
    }

   	/**
	* 根据id删除UserRoleCenter
	*/
    @Override
    @Transactional
	public Integer deleteUserRoleCenterById(Integer id) throws Exception {
        return sysUserRoleCenterMapper.deleteUserRoleCenterById(id);
    }

	/**
	* 根据id逻辑删除UserRoleCenter
	*/
    @Override
    @Transactional
	public Integer removeUserRoleCenterById(Integer id) throws Exception {
        return sysUserRoleCenterMapper.removeUserRoleCenterById(id);
    }
}
